package com.dw.listener;

import javax.servlet.http.HttpSessionBindingEvent;
import javax.servlet.http.HttpSessionBindingListener;

import com.dw.dao.MessageDao;
import com.dw.entity.Message;


public class MessageStream implements HttpSessionBindingListener {
	private Message message;
	public MessageStream(Message message) {
		this.message = message;
	}
	public void valueBound(HttpSessionBindingEvent event) {
		MessageDao md = new MessageDao();
		md.save(message);
	}

	public void valueUnbound(HttpSessionBindingEvent event) {
		
	}
}
